<!DOCTYPE html>
<html lang="en" >
<head>
    <title>Atomsk - CSV format - Pierre Hirel</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" media="screen" type="text/css" title="Default" href="./default.css" />
    <link rel="icon" href="../img/atomsk_logo.png" type="image/png" />
</head>
   
<body>

<p><a href="./index.html">Back to main menu</a></p>

<h2>Format: CSV</h2>

<p><strong>Name:</strong> Comma-Separated Values format</p>

<p><strong>Extension:</strong> csv</p>

<p><strong>Specification:</strong> no standard; recommendations at <a href="https://tools.ietf.org/html/rfc4180">IETF web page</a></p>

<p><strong>Visualization programs:</strong> none</p>


<h4>Restrictions</h4>

<p>A file in the Comma-Separated Values (CSV) format is a plain-text file containing values separated by commas (,), as its name suggests. Such files can be easily imported or produced in spreadsheets (like Microsoft Excel or LibreOffice Calc), and also in some Web applications.</p>

<p>When writing a CSV file, Atomsk writes the names of the fields in the first line (species,x,y,z, and so on), followed by lines containing values. All available informations are written in a CSV file: the atom species, coordinates (x,y,z), the shells coordinates if any, the auxiliary properties if any, the cell vectors, and the comments.</p>

<p>When reading CSV file, Atomsk will determine the field separator from the first line. By default, values are expected to be separated by commas (,). However, if the first line contains semicolons (;) or pipe (|) characters, then Atomsk will assume that these are the separators throughout the whole file.</p>

<p>Then, Atomsk will also look for keywords in the first line. If recognizable keywords are present, then they are used to determine in which column each data type is stored (atom species, x, y, z, etc.). If shells are present (in the sense of an ionic core-shell model potential), then their positions are also read. If auxiliary properties are present, they are not read (they are ignored).</p>

<p>If no recognizable keyword is present on the first line, then Atomsk will attempt to find numbers among the data, and interpret them as atom coordinates, assuming that each line contains data about one atom. All atoms are then considered as hydrogen atoms.</p>

<p>If the box vectors cannot be read from the CSV file, then Atomsk will construct a bounding box.</p>



<h4>Examples</h4>

<ul>
<li><code class="command">atomsk my_system.xsf csv</code>
<p>This will read the file <code>my_system.xsf</code>, and convert it to <code>my_system.csv</code>.</p></li>
</ul>


<p><a href="./index.html">Back to main menu</a></p>

</body>

</html>
